package com.defu.newmall.dao;

import com.defu.newmall.entity.NewBeeMallGoods;
import com.defu.newmall.utils.PageQueryUtil;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface NewBeeMallGoodsDao {
    /**
     * 保存一条新记录
     * @param record
     * @return
     */
    int insertSelective(NewBeeMallGoods record);

    /**
     * 根据主键id获取记录
     * @param goodsId
     * @return
     */
    NewBeeMallGoods selectByPrimaryKey(Long goodsId);

    /**
     * 修改一条记录
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(NewBeeMallGoods record);

    List<NewBeeMallGoods> findNewBeeMallGoodsList(PageQueryUtil pageUtil);

    int getTotalNewBeeMallGoods(PageQueryUtil pageUtil);

    int batchUpdateSellStatus(@Param("orderIds") Long[] orderIds,@Param("sellStatus") int sellStatus);
}
